<nz-layout>
  <nz-header>
    <div class="header">
      <div class="logo">
        <img src="assets/img/logo-home.png" alt="" srcset="">
      </div>
      <div style="flex: 1 1 auto">
      </div>
      <div class="link-warper" *ngIf="!isLogin">
        <a (click)="toPage('/pages/register')">注册</a>
      </div>
      <div class="link-warper" *ngIf="!isLogin">
        <a (click)="toPage('/pages/login')">登录</a>
      </div>
      <nz-dropdown class="link-warper" *ngIf="isLogin">
        <a nz-dropdown>
          {{ username }}
        </a>
        <ul nz-menu nzSelectable>
          <li nz-menu-item (click)="toPage('/memeber/center')">
            <a>个人中心</a>
          </li>
          <li nz-menu-item (click)="toPage('/billing')">
            <a>账单明细</a>
          </li>
          <li nz-menu-item (click)="toPage('/account')">
            <a>账号设置</a>
          </li>
          <li nz-menu-divider></li>
          <li nz-menu-item>
            <a>退出</a>
          </li>
        </ul>
      </nz-dropdown>
      <nz-dropdown>
        <a nz-dropdown class="language">
          {{ ('language' | translate) || '语言' }} <i nz-icon type="down"></i>
        </a>
        <ul nz-menu nzSelectable>
          <li nz-menu-item (click)="changeLang('zh')">
            <a>中文</a>
          </li>
          <li nz-menu-item (click)="changeLang('en')">
            <a>English</a>
          </li>
          <li nz-menu-item>
            <a>日本語</a>
          </li>
        </ul>
      </nz-dropdown>
    </div>
  </nz-header>
  <nz-content>
      <button class="button button-login" (click)="toPage('/pages/login')">登陆</button>
      <button class="button button-register" (click)="toPage('/pages/register')">注册</button>
  </nz-content>
</nz-layout>